﻿#region Copyright

// All Material Copyright © 2010 Dynamic Concepts Development Corp., All Rights Reserved.
//      Portions Copyright © 1984-2009 Dynamic Concepts Development Corp., All Rights Reserved.
// For further information please contact: SoftwareSupport@dynconcepts.com
// Dynamic Concepts Development Corp.  311 W 57th St. Suite #422, New York, NY 10019

#endregion

#region Using References

using System.Collections;
using System.Collections.Generic;

#endregion

namespace DynConDevCorp.OpenArch.SupportLibrary.Serialization
{
    internal class PropertySerializationDescriptorCollection : IEnumerable<PropertySerializationDescriptor>
    {
        #region Public Properies and Indexers

        public int Count
        {
            get { return r_Items.Count; }
        }

        #endregion

        #region Public Methods

        public void Add(PropertySerializationDescriptor descriptor)
        {
            r_Items.Add(descriptor);
        }

        public IEnumerator<PropertySerializationDescriptor> GetEnumerator()
        {
            return r_Items.GetEnumerator();
        }

        #endregion

        #region Private Methods

        IEnumerator IEnumerable.GetEnumerator()
        {
            return r_Items.GetEnumerator();
        }

        #endregion

        #region Instance Fields (ReadOnly)

        private readonly List<PropertySerializationDescriptor> r_Items = new List<PropertySerializationDescriptor>();

        #endregion
    }
}